Skip to content

ci: run the test suite and docs build on every push and pull request - #5

Merged
EternalTime merged 1 commit into
masterfrom
fm/ci-cellularautomata
Aug 19, 2026
Merged

ci: run the test suite and docs build on every push and pull request#5
EternalTime merged 1 commit into
masterfrom
fm/ci-cellularautomata

Conversation

@EternalTime

Copy link
Copy Markdown
Owner

Intent

Make GitHub run CellularAutomata's tests automatically on every push and every pull request, so nothing lands untested. Add a GitHub Actions workflow at .github/workflows/tests.yml that installs the library exactly the way the repository's own published instructions describe (pip install -e ".[test]", using the test extra rather than installing pytest by hand), runs pytest, and does so across the FULL range of Python versions the repository claims to support - pyproject.toml sets requires-python >=3.8 and classifies 3.8 through 3.14, and the README says 'Requires Python 3.8+', so the matrix deliberately spans 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 rather than a convenient subset. It also builds the manual with the docs extra (pip install -e ".[docs]" then make -C docs html) so a broken documentation build is caught too. Deliberate choices a reviewer should not flag: the workflow is intentionally plain and boring - only actions/checkout@v4 and actions/setup-python@v5, no dependency caching, no third-party actions, no pinned dependency versions, no concurrency group, no explicit permissions block, unfiltered push/pull_request triggers, and fail-fast disabled so every matrix entry reports independently. The scope was constrained to adding only this workflow file; the published install instructions in README.md and docs/getting_started.rst were verified to work verbatim on a clean runner and therefore intentionally left unchanged. Verified on GitHub: run 32224214523 on this branch was green on all 8 jobs, with 23 tests passing on every Python version from 3.8 to 3.14 and the docs build succeeding, so the claimed support range is true and no version needed to be dropped.

What Changed

  • Added .github/workflows/tests.yml, triggered unfiltered on push and pull_request, using only actions/checkout@v4 and actions/setup-python@v5 with no caching, pinning, concurrency group, or explicit permissions block.
  • The test job installs the library the way the repository's own instructions describe (pip install -e ".[test]") and runs pytest across a fail-fast-disabled matrix of Python 3.8 through 3.14, matching requires-python >=3.8 and the classifiers in pyproject.toml.
  • The docs job installs with pip install -e ".[docs]" and runs make -C docs html on Python 3.12, so a broken manual build fails CI too.

The workflow is already green on this branch: run 32224214523 passed all 8 jobs, with 23 tests passing on every Python version from 3.8 to 3.14 and the docs build succeeding. No source, README, or docs/getting_started.rst changes were needed; the published install recipe was verified to work verbatim on a clean runner.

Risk Assessment

✅ Low: The change adds a single, plain CI workflow file with no source or packaging changes, it satisfies every required constraint in the stated intent, and the identical workflow already ran green on all 8 jobs on this branch.

Testing

I exercised the workflow the way a contributor actually experiences it: the pushed commit already produced GitHub Actions run 32224214523 on this branch, and it is green on all 8 jobs - 23 tests passing on every Python version from 3.8 through 3.14, each installed via the published pip install -e \".[test]\" extra rather than a hand-rolled pytest install, plus a docs job that installed the docs extra and finished make -C docs html with build succeeded.. I pulled the per-job CI logs and distilled them into a transcript artifact, captured a screenshot of the run page showing the eight green checks, and independently reproduced the README's own test recipe in a fresh local venv (23 passed on Python 3.14.5) to confirm the published instructions work verbatim. This change has no rendered UI surface of its own, so the reviewer-visible artifact is the Actions run page screenshot, which is the real end-user surface for CI. One gap worth naming: only the push trigger has a live run behind it - the pull_request half is declared in the same workflow file GitHub already parsed and executed, but no PR exists on this branch yet and opening one falls outside this phase, so that trigger is verified by declaration rather than by an observed run. No test failures, no flakiness, and I cleaned the transient caches and egg-info my local run created.

Evidence: CI transcript: install command, pytest result per Python version, and docs build outcome

GitHub Actions run 32224214523 - workflow 'tests' - branch fm/ci-cellularautomata - event: push - conclusion: success test (3.8) Install pip install -e ".[test]" test (3.8) Run tests platform linux -- Python 3.8.18, pytest-8.3.5, pluggy-1.5.0 test (3.8) Run tests tests/test_pyCA.py ....................... [100%] test (3.8) Run tests == 23 passed in 0.76s == test (3.9) Run tests platform linux -- Python 3.9.25 ... 23 passed in 0.75s test (3.10) Run tests platform linux -- Python 3.10.20 ... 23 passed in 0.80s test (3.11) Run tests platform linux -- Python 3.11.16 ... 23 passed in 0.68s test (3.12) Run tests platform linux -- Python 3.12.13 ... 23 passed in 1.04s test (3.13) Run tests platform linux -- Python 3.13.15 ... 23 passed in 0.84s test (3.14) Run tests platform linux -- Python 3.14.7 ... 23 passed in 0.73s docs Install pip install -e ".[docs]" docs Build the manual build succeeded. docs Build the manual The HTML pages are in _build/html.

GitHub Actions run 32224214523  -  workflow 'tests'  -  branch fm/ci-cellularautomata  -  event: push  -  conclusion: success

=== Per-job install + pytest transcript (extracted from CI logs) ===

docs	Build the manual  The HTML pages are in _build/html.
docs	Build the manual  build succeeded.
docs	Install  pip install -e ".[docs]"
test (3.10)	Install  pip install -e ".[test]"
test (3.10)	Run tests  ============================== 23 passed in 0.80s ==============================
test (3.10)	Run tests  collected 23 items
test (3.10)	Run tests  configfile: pyproject.toml
test (3.10)	Run tests  platform linux -- Python 3.10.20, pytest-9.1.1, pluggy-1.6.0
test (3.10)	Run tests  tests/test_pyCA.py .......................                               [100%]
test (3.11)	Install  pip install -e ".[test]"
test (3.11)	Run tests  ============================== 23 passed in 0.68s ==============================
test (3.11)	Run tests  collected 23 items
test (3.11)	Run tests  configfile: pyproject.toml
test (3.11)	Run tests  platform linux -- Python 3.11.16, pytest-9.1.1, pluggy-1.6.0
test (3.11)	Run tests  tests/test_pyCA.py .......................                               [100%]
test (3.12)	Install  pip install -e ".[test]"
test (3.12)	Run tests  ============================== 23 passed in 1.04s ==============================
test (3.12)	Run tests  collected 23 items
test (3.12)	Run tests  configfile: pyproject.toml
test (3.12)	Run tests  platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0
test (3.12)	Run tests  tests/test_pyCA.py .......................                               [100%]
test (3.13)	Install  pip install -e ".[test]"
test (3.13)	Run tests  ============================== 23 passed in 0.84s ==============================
test (3.13)	Run tests  collected 23 items
test (3.13)	Run tests  configfile: pyproject.toml
test (3.13)	Run tests  platform linux -- Python 3.13.15, pytest-9.1.1, pluggy-1.6.0
test (3.13)	Run tests  tests/test_pyCA.py .......................                               [100%]
test (3.14)	Install  pip install -e ".[test]"
test (3.14)	Run tests  ============================== 23 passed in 0.73s ==============================
test (3.14)	Run tests  collected 23 items
test (3.14)	Run tests  configfile: pyproject.toml
test (3.14)	Run tests  platform linux -- Python 3.14.7, pytest-9.1.1, pluggy-1.6.0
test (3.14)	Run tests  tests/test_pyCA.py .......................                               [100%]
test (3.8)	Install  pip install -e ".[test]"
test (3.8)	Run tests  ============================== 23 passed in 0.76s ==============================
test (3.8)	Run tests  collected 23 items
test (3.8)	Run tests  configfile: pyproject.toml
test (3.8)	Run tests  platform linux -- Python 3.8.18, pytest-8.3.5, pluggy-1.5.0
test (3.8)	Run tests  tests/test_pyCA.py .......................                               [100%]
test (3.9)	Install  pip install -e ".[test]"
test (3.9)	Run tests  ============================== 23 passed in 0.75s ==============================
test (3.9)	Run tests  collected 23 items
test (3.9)	Run tests  configfile: pyproject.toml
test (3.9)	Run tests  platform linux -- Python 3.9.25, pytest-8.4.2, pluggy-1.6.0
test (3.9)	Run tests  tests/test_pyCA.py .......................                               [100%]
Evidence: Local reproduction of the README test recipe (fresh venv, Python 3.14.5)
$ python3 -m venv .venv && pip install -e ".[test]" && pytest
= test session starts ==
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0
configfile: pyproject.toml
collected 23 items

tests/test_pyCA.py ....................... [100%]

== 23 passed in 1.75s ==

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ .github/workflows/tests.yml:38 - The docs job runs make -C docs html without -W (or SPHINXOPTS=-W), so Sphinx warnings such as broken cross-references, missing toctree entries, or unresolved bibtex citations will not fail the job - only hard build errors are caught. This is a coverage boundary, not a defect: the intent only requires that the manual is built with the docs extra, and turning warnings into errors would expand the deliberately plain scope.
✅ **Test** - passed

✅ No issues found.

  • gh-axi run view 32224214523 - confirmed workflow tests on branch fm/ci-cellularautomata, event push, conclusion success, all 8 jobs green (test 3.8/3.9/3.10/3.11/3.12/3.13/3.14 + docs)
  • gh-axi run view 32224214523 --job <id> --log for each of the 7 matrix jobs - confirmed each ran pip install -e ".[test]" and reported 23 passed on Python 3.8.18, 3.9.25, 3.10.20, 3.11.16, 3.12.13, 3.13.15, 3.14.7
  • gh-axi run view 32224214523 --job 95980520583 --log (docs job) - confirmed pip install -e ".[docs]" then make -C docs html ending in build succeeded. with 14 source files written
  • python3 -m venv + pip install -e ".[test]" + pytest - local reproduction of the README/getting_started install recipe verbatim: 23 passed on Python 3.14.5
  • chrome-devtools-axi open https://github.com/EternalTime/CellularAutomata/actions/runs/32224214523 + screenshot - captured the reviewer-visible Actions run page showing all 8 green checks
  • git status --porcelain --untracked-files=all --ignored - confirmed worktree left clean after removing .pytest_cache, pyCA.egg-info and pycache created by the local run
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@EternalTime
EternalTime merged commit c9692dc into master Aug 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant